# Author:Li
import random


def random_string(length=4):
    """获取4位验证码"""
    selected_chars = random.choices(
        '01234567890',
        # QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm
        k=length
    )
    return ''.join(selected_chars)
